home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Plus 2007
/
Programmer-Plus-2007.iso
/
Programming
/
Compilers
/
Miracle C Compiler
/
miricleC compiler.msi
/
Instal01.cab
/
_5A63258006614D5F94BF8EE04370112F
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1999-02-27
|
428 b
|
19 lines
#include <stdio.h>
/* print Fahrenheit-celcius table
for fahr = 0, 20 , ..., 300 */
main()
{
float fahr, celcius;
int lower , upper, step;
lower = 0; /* lower limit of temperature table */
upper = 300; /* upper limit*/
step = 20; /* step size*/
fahr = lower ;
while (fahr <= (float)upper) {
celcius = (5.0/9.0) * (fahr-32.0);
printf("%3.0f %6.1f\n", fahr, celcius);
fahr = fahr + step;
}
}